{template 'admin','header'}
<style type="text/css">
    #categories ul{margin-left: 30px;}
</style>
<form action="{$self_url}?action={$action}&module={$module}" method="post" onsubmit="return r_submit(this);">
<input type="hidden" name="forward" value="{HTTP_REFERER}">
{if $action=='edit'}
<input type="hidden" name="id" value="{$data['id']}">
{/if}
<table cellpadding="2" cellspacing="1" class="table_form">
    <caption>发布内容 {$cat['catname']}</caption>
    {if $module_name=='category'}
    <input type="hidden" name="catid" value="{$catid}">
    {else}
    <input type="hidden" name="catid" value="{$catid}">
    {/if}
    {if check_perms('post_to_other_cate') && isset($relcat)}
    <tr>
        <th width="200"><strong>发布到其他栏目</strong></th>
        <td>
            <div style="width: 100%;height: 100%;background-color: #E3F0F9;text-align: center;cursor: pointer;" onclick="$('#categories').slideToggle()">展开></div>
            <div id="categories" style="width: 100%;height: 200px;overflow: scroll;z-index: 0;display: none;">
                {$relcat}
            </div>
            
        </td>
    </tr>
    {/if}
    {loop $form $field $f}
    {if $f['showedit']!=1}
    {php continue;}
    {/if}
    <tr>
        <th width="200"><strong>{$f['name']}</strong> <br> {$f['tips']}</th>
        <td>
            {$f['input']}
            {if $field=='addtime' && isset($form['showaddtime'])}{$form['showaddtime']['input']}{/if}
            {if $field=='title' && isset($form['style'])}{$form['style']['input']}{/if}
        </td>
    </tr>
    {/loop}
    <tr>
        <th></th>
        <td>
            <input type="submit" name="submitform" value="保存" id="add"/>&nbsp;
            <input type="button" name="back" value="返回" id="back" onclick="window.location='{HTTP_REFERER}'"/>
        </td>
    </tr>
</table>
</form>
{template 'admin','footer'}
